import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useAppStore = defineStore(
  'app',
  () => {
    const index = ref(0)

    // 设置图片取值
    const setIndex = (value: number) => (index.value = value)

    return {
      index,
      setIndex,
    }
  },
  { persist: true }
)
